<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户创建相册页面</title>
    <script type="text/javascript" th:src="@{/webjars/jquery/3.3.1/jquery.js}" ></script>
</head>
<body>
    <form method="post" action="createPhotoAlbum">
        给你的相册来个个性名称:
        <input type="text" name="albumName" id="photoAlbumName" /> <br/>
        <input type="button" value="创建" id="savePhotoAlbum" />
        <input type="reset" value="清除" />
    </form>
</body>
<script type="text/javascript">
    $(function(){
       $("#savePhotoAlbum").click(function(){             //点击创建,发送ajax,如果创建成功，弹出漂亮弹窗
           var photoAlbumName = $("#photoAlbumName").val();  //获取相册名称
           $.ajax({
              url:"createPhotoAlbum/"+photoAlbumName,
              method:"POST",
              dataType:"json",
              success:function (dt) {
                  console.log(dt);
              } ,
              error:function (dt) {
                  console.log(dt);
              }
           });
       }) ;
    });
</script>
</html>